package com.itheima.controller;

import com.itheima.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author wuli
 * @create 2021-11-05 7:51
 */
public class UserController {

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
//        UserService userService = (UserService) context.getBean("userService");
        UserService userService = context.getBean(UserService.class);
        System.out.println(userService.toString());
        //userService.save();
    }
}
